#ifndef _func_H_
#define _func_H_

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<dirent.h>
#include<string.h>
#include<unistd.h>
#include<sys/stat.h>
#include<sys/types.h>
#include<sys/mman.h>
#include<sys/shm.h>
#include<sys/wait.h>
#include<sys/socket.h>
#include<sys/epoll.h>
#include<sys/uio.h>
#include<arpa/inet.h>
#include<netdb.h>
#include<netinet/in.h>
#include<pwd.h>
#include<grp.h>
#include<time.h>
#include<fcntl.h>
#include<string.h>
#include<signal.h>
#include<pthread.h>
#include<errno.h>

#define THREAD_ERROR_CHECK(ret,funcName) do {\
    if(0!=ret){\
   printf("%s: %s\n",funcName,strerror(ret));\
    }}while(0)
#define ARGS_CHECK(argc,n){\
	if(argc!=n){\
		fprintf(stderr,"args error:expect %d arguments\n",n);\
	exit(1);\
	}\
}
#define ERROR_CHECK(retVal,val,msg){\
    if(retVal == val){\
        perror(msg);\
		exit(1);\
	}\
}
#endif

